extends Node2D

const SCREENS_TO_PREPARE = 3

const STARCOUNT = 30

func _ready():
	make_starscreen()
	pass # Replace with function body.

func make_starscreen():
	var screen = Node2D.new()
	for _i in range(STARCOUNT*SCREENS_TO_PREPARE):
		var x = rand_range(0,get_viewport().size.x * SCREENS_TO_PREPARE)
		var y = rand_range(0,get_viewport().size.y)
		var newstar =  Star.new($star)
		newstar.position = Vector2(x,y)
		screen.call_deferred("add_child", newstar)
	call_deferred("add_child", screen)
